package com.ea.eadp.nexus.test.pageDefinition.newconsole;

import com.ea.eadp.nexus.test.common.PageOperation;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;

/**
 * Created by yimingcao on 11/21/2014.
 */
public class UpdateEmailSuccessPage extends ConsoleBasePage {
    public static final String continueBtn = "continueBtn";

    public UpdateEmailSuccessPage(WebDriver driver) {
        super(driver, UpdateEmailSuccessPage.class, continueBtn);
    }

    public void waitPageLoadCompleted() {
        //TODO not sure why waitPageLoadCompleted not works
    }

    public void clickContinueButton() throws InterruptedException {
        Thread.sleep(2000);
        PageOperation.WebDriverWait(driver, "panel-updated-msg");
        clickBlank("//div[@id='panel-updated-msg']//span[@class='title']");
        Thread.sleep(2000);
        sendControllerKey(Keys.DOWN);
        sendControllerKey('A');
    }
}